<template>
  <div class="uni-search-toggle" @click="clickEvent">
    <span v-if="!value">展开</span>
    <i v-if="!value" class="el-icon-arrow-down"></i>
    <span v-if="value">收起</span>
    <i v-if="value" class="el-icon-arrow-up"></i>
  </div>
</template>

<style lang="scss">
</style>

<script>

/**
 * 1、数据库审计 - 选择字段类型组件
 */

export default {
  name: 'uni-search-toggle',
  props: {
    /**
     * 双向绑定
     */
    value: {
      type: Boolean,
      default () {
        return true
      }
    }
  },
  data () {
    return {}
  },
  watch: {},
  created () { },
  beforeMount () { },
  mounted () { },
  methods: {
    clickEvent (val) {
      this.$emit('input', !this.value)
    }
  }
}
</script>

<style lang="scss">
.uni-search-toggle {
  margin-left: 10px;
}
</style>
